package UIUtils
{
	public class uif_cache {
		private var _data: Object;
		public function uif_cache() {
			_data = new Object();
		}
		
		public function getValue(a_index: String): Object {
			var index: String = textIndex(a_index);
			return _data.hasOwnProperty(index)?_data[index]:null;
		}
		
		public function isValue(a_index: String): Boolean {
			return _data.hasOwnProperty(textIndex(a_index));
		}
		
		public function setValue(a_index: String, a_value: Object): void {
			var index: String = textIndex(a_index);
			_data[index] = a_value;
		}
		
		public function textIndex(a_text: String): String {
			return MD5.encrypt(a_text);
		}		
	}
}